import Vue from 'vue'
import Element from 'element-ui'
import mulSelect from './components/MDatePicker/mulSelect'
import 'element-ui/lib/theme-chalk/index.css'
import CollapseTransition from 'element-ui/lib/transitions/collapse-transition';
import i18n from './lang' // 国际化
import 'babel-polyfill'
// import d3 from 'd3'
// import * as d3 from 'd3'
// import * as venn from 'venn.js'

import App from './App'
import router from './router'
import store from './store'
import axios from './utils/request'
import qlikReq from './utils/qlikReq'
import echarts from 'echarts'
import * as filters from './filters' // 全局filter
import './errorLog'// error log
import './permission' // 权限
import permision from './directive/permission'
import './styles/iconfont.css'
import './fonts/index.css'
import 'echarts/map/js/world.js'
import http from 'axios'
import 'ag-grid/dist/styles/ag-grid.css'
// import 'ag-grid/dist/styles/ag-theme-fresh.css'
import 'ag-grid/dist/styles/ag-theme-balham.css'
import 'ag-grid-enterprise/main'
// import Chat from 'vue-beautiful-chat'
import Chat from './views/chatRobot'
Vue.use(Chat)
Vue.use(permision)
Vue.prototype.axios = axios
// Vue.prototype.qlikReq = qlikReq
Vue.prototype.http = http
Vue.prototype.echarts = echarts
// Vue.prototype.d3 = d3
// Vue.prototype.venn = venn
Vue.use(Element, {
  i18n: (key, value) => i18n.t(key, value)
})
//全局提示框插件2018.12.11
//this.$toast(message,type,time);
//接受三个参数，1.提示文字内容message，2.提示的类型type（成功success,警告warning,错误error,信息info(默认)）,3.显示后多久消失time
import Toast from '../src/components/toast/toast.js'
Vue.use(Toast);

Vue.component('mulSelect', mulSelect)
Vue.component('el-collapse-transition', CollapseTransition)
// register global utility filters.
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})
Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  i18n,
  template: '<App/>',
  components: { App }
})
